<!--
帖子
 -->
<template>
  <div>
    <div class="invitationBox" v-for="item in 10" :key="item">
      <div class="invitationBoxTitle">
        这是标题{{
          item
        }}这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题这是标题
      </div>
      <div class="invitationBoxSubTitle">
        这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容
      </div>
      <div class="invitationBoxBottom">
        <div class="invitationBoxBottomItem">320621 次阅读</div>
        <div class="invitationBoxBottomItem">25 回复</div>
        <div class="invitationBoxBottomItem">302 赞</div>
        <div class="invitationBoxBottomtype">帖子类别</div>
      </div>
      <el-divider></el-divider>
    </div>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage4"
      :page-sizes="[100, 200, 300, 400]"
      :page-size="100"
      layout="total, sizes, prev, pager, next, jumper"
      :total="400"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  name: "myAnswer",
  data() {
    return {
      currentPage4: 4
    };
  },
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    }
  }
};
</script>

<style lang="scss" scoped>
.invitationBox {
  .invitationBoxTitle {
    font-size: 23px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    width: 850px;
    overflow: hidden;
    text-overflow: ellipsis; //超出部分以省略号显示
    white-space: nowrap;
    cursor: pointer;
    &:hover {
      color: #1d2f70;
      text-decoration: underline;
    }
  }
  .invitationBoxSubTitle {
    color: #6c6c6c;
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 可以显示的行数，超出部分用...表示*/
    -webkit-box-orient: vertical;
  }
  .invitationBoxBottom {
    display: flex;
    position: relative;
    margin-top: 14px;
    color: #b3b2b2;
    .invitationBoxBottomItem {
      margin-right: 18px;
      font-size: 14px;
    }
    .invitationBoxBottomtype {
      right: 20px;
      position: absolute;
    }
  }
}
</style>
